<template>
  <el-config-provider :locale="locale" :size="size">
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </el-config-provider>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { storeToRefs } from "pinia";
import { messages } from "@/i18n";

const appStore = useStore.appStore();

const { componentSize, theme }: any = storeToRefs(appStore);

const size = computed(() => componentSize.value);
const locale = computed(() => messages[appStore.language].el);

onMounted(() => {
  nextTick(() => {
    handleThemeStyle(theme.value);
  });
});
</script>

<style lang="less">
.admin {
  padding: 20px;
  box-sizing: border-box;
  background-color: #ffffff;
  border-radius: 10px;
  min-height: 100%;
  .admin-title {
    width: 100%;
    font-family: PingFang HK, PingFang HK;
    font-weight: 600;
    font-size: 20px;
    color: #1e2021;
    margin-bottom: 15px;
  }
}
</style>
